Skip to main content

Workflow Schedule Template

The Workflow Schedule template demonstrates how BindAI workflows can execute automatically at predefined times or recurring intervals without requiring manual input. Instead of waiting for a user request, the scheduler continuously checks registered schedules and launches workflows whenever they become due. This template introduces time-based workflow automation.

Purpose

This template demonstrates how to:
  • create a workflow schedule
  • register scheduled workflows
  • execute workflows automatically
  • configure recurring execution
  • reschedule future runs
It introduces background automation into the workflow system.

Workflow Structure

The scheduled workflow itself is identical to any other workflow.
The difference is how the workflow is started.

Scheduling Architecture

Execution begins with the scheduler.
The scheduler decides when execution begins.

Scheduler Flow

The scheduler continuously checks registered schedules.
Only workflows whose scheduled time has arrived are executed.

Workflow Schedule

A schedule describes when a workflow should run. Typical information includes:
  • workflow identifier
  • next execution time
  • recurring interval
  • enabled state
Example:

One-Time Schedule

A workflow may execute only once.
After completion, no future execution occurs unless another schedule is created.

Recurring Schedule

Recurring schedules automatically calculate the next execution.
This allows continuous automation without user interaction.

Example

Suppose a workflow runs every hour.
After each execution, the scheduler updates the next execution time.

Automatic Execution

Applications do not manually start scheduled workflows.
The scheduler handles execution automatically.

Typical Use Cases

Scheduled workflows are commonly used for:
  • daily reports
  • periodic summaries
  • knowledge synchronization
  • document indexing
  • monitoring services
  • automated backups
  • recurring maintenance
  • data synchronization
These workflows usually operate without direct user interaction.

Scheduler vs Loop

Scheduling and loops both involve repeated execution but solve different problems. Schedulers manage when workflows begin. Loops manage how a workflow repeats internally.

Time Zones

Production scheduling should use timezone-aware timestamps.
Using timezone-aware datetimes avoids problems caused by:
  • daylight saving time
  • regional deployments
  • UTC/local conversions

Enabling and Disabling

Schedules may be enabled or disabled.
Disabled schedules remain registered but are ignored until re-enabled.

Monitoring Scheduled Workflows

Production systems should monitor:
  • successful executions
  • failed executions
  • execution duration
  • missed schedules
  • next execution time
  • recurring failures
Monitoring ensures recurring automation remains healthy.

Best Practices

  • Use timezone-aware datetimes.
  • Keep scheduled workflows idempotent whenever possible.
  • Choose sensible execution intervals.
  • Avoid overlapping executions of the same workflow unless intentionally supported.
  • Monitor recurring workflow health.
  • Log every scheduled execution.

Related Templates

The Scheduling template works well with:
  • Workflow Retry
  • Workflow Timeout
  • Workflow Human
These templates together enable reliable production automation.

Summary

The Workflow Schedule template demonstrates how BindAI automatically executes workflows based on predefined schedules. By separating scheduling from execution, workflows can run continuously in the background, enabling recurring AI automation while keeping workflow logic completely independent from timing concerns.